<template>
  <div>
    <el-header style="text-align: center;font-size: 50px;color: #F56C6C">最新公告！</el-header>
    <el-main
        :data = "news"
        style = "text-align: left;">
      {{news}}
    </el-main>
  </div>
</template>

<script>
export default {
  name: "Announcement",

  data() {
    return {
      news:"",
    }
  },

  created() {
    this.load();
    this.$emit("generateTab",this.plate,this.func)
  },

  methods: {
    load() {
      //axios方式http://localhost:9090前缀写在了request.js文件中，可省略
      this.request({
        url: "/announcement/late",
        method: "GET",
      }).then(
          res => {
            this.news = res.data[0].content;
          }
      )
    },
  }
}
</script>

<style scoped>

</style>
